package cn.com.lms.business.livecourse.persistence.entity;

import io.swagger.v3.oas.annotations.media.Schema;

import javax.persistence.*;
import java.util.Date;


/**
 * CourseChatRoom
 *
 * @author barry
 * @date 2020/3/21
 **/
@Entity
@Table(name = "bnz_course_chat_room", schema = "bnzj")
public class CourseChatRoom {

    @Schema(description="直播聊天室房间id")
    private Integer id;
    @Schema(description="腾讯云im群组名")
    private String timGroupName;
    @Schema(description="腾讯云im群组id")
    private String timGroupId;
    @Schema(description="腾讯云im群组类型：1音视频聊天室")
    private Integer timGroupType;
    @Schema(description="占用的课程id")
    private Integer courseInfoId;
    @Schema(description="课程结束时间（加部分缓冲时间）")
    private Date courseExpireTime;
    @Schema(description="创建时间")
    private Date createTime;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "tim_group_name")
    public String getTimGroupName() {
        return timGroupName;
    }

    public void setTimGroupName(String timGroupName) {
        this.timGroupName = timGroupName;
    }

    @Basic
    @Column(name = "tim_group_id")
    public String getTimGroupId() {
        return timGroupId;
    }

    public void setTimGroupId(String timGroupId) {
        this.timGroupId = timGroupId;
    }

    @Basic
    @Column(name = "tim_group_type")
    public Integer getTimGroupType() {
        return timGroupType;
    }

    public void setTimGroupType(Integer timGroupType) {
        this.timGroupType = timGroupType;
    }

    @Basic
    @Column(name = "course_info_id")
    public Integer getCourseInfoId() {
        return courseInfoId;
    }

    public void setCourseInfoId(Integer courseInfoId) {
        this.courseInfoId = courseInfoId;
    }

    @Basic
    @Column(name = "course_expire_time")
    public Date getCourseExpireTime() {
        return courseExpireTime;
    }

    public void setCourseExpireTime(Date courseExpireTime) {
        this.courseExpireTime = courseExpireTime;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "CourseChatRoom{" +
                "id=" + id +
                ", timGroupName='" + timGroupName + '\'' +
                ", timGroupId='" + timGroupId + '\'' +
                ", timGroupType=" + timGroupType +
                ", courseInfoId=" + courseInfoId +
                ", courseExpireTime=" + courseExpireTime +
                ", createTime=" + createTime +
                '}';
    }
}
